<template>
	<view class="ucenter-page">
		<u-navbar title-size="36" height="42" :border-bottom="false" title="我的好友"></u-navbar>
		<view class="search-bar">
			<view class="search-inner">
				<image src="../../static/images/search-2.png" mode="" class="search-icon"></image>
				<input type="text" value="" v-model="search" placeholder="输入好友姓名" class="ui-input"
					placeholder-style="color:#9C9C9C;" @input="input" />
				<image src="../../static/images/clear.png" class="clear" mode="" v-if="clear" @click="inputClear">
				</image>
			</view>
		</view>
		<view class="content">
			<view class="u-cells">
				<view class="u-cell" v-for="(res, index) in list" :key="index">
						<view class="u-cell-top">
							<view class="u-cell-title flex_bd ellipsis">{{res.title}}</view>
							<view class="price">¥{{res.price}}</view>
						</view>
						<view class="u-cell-tags">
							<view class="tag" v-for="(item, index) in res.tags" :key="index">{{item}}</view>
						</view>
						<view class="u-cell-time">{{res.time}}</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				list: [{
					title: '线索 UB20091910  刘飞翔',
					price: 2000,
					tags: ['设备成交', 'ZE205E-10', 'LA010201'],
					time: '2021-05-19'
				}, {
					title: '线索 UB20091019  西南建设公…',
					price: 2000,
					tags: ['累计成交额', '好友分红'],
					time: '2021-05-19'
				}],
				clear: false,
				search: '',
			}
		},
		onLoad() {

		},
		methods: {
			openUrl(e) {
				console.log(e)
				uni.navigateTo({
					url: e
				});
			},
			input() {
				this.clear = true
			},
			inputClear() {
				this.search = '';
				this.clear = false;
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F5F5F5;
	}

	.search-bar {
		padding: 16rpx 32rpx 20rpx;
		background-color: #fff;

		.search-inner {
			position: relative;

			.search-icon {
				width: 40rpx;
				height: 40rpx;
				position: absolute;
				left: 32rpx;
				top: 50%;
				margin-top: -20rpx;
			}

			.ui-input {
				height: 72rpx;
				background-color: #F3F4F6;
				border-radius: 36rpx;
				padding-left: 80rpx;
				font-size: 28rpx;
			}

			.clear {
				width: 40rpx;
				height: 40rpx;
				display: block;
				position: absolute;
				right: 16rpx;
				top: 50%;
				margin-top: -20rpx;
				z-index: 11;
			}
		}
	}

	.content {
		padding: 32rpx;
	}

	.u-cell {
		background-color: #fff;
		border-radius: 12rpx;
		margin-bottom: 24rpx;
		padding: 32rpx;

		.u-cell-top {
			display: flex;
			align-items: center;

			.u-cell-title {
				font-size: 28rpx;
				color: #383842;
			}

			.price {
				font-size: 36rpx;
				color: #FE6714;
				margin-left: 60rpx;
			}
		}

		.u-cell-tags {
			margin-bottom: 20rpx;

			.tag {
				display: inline-block;
				font-size: 22rpx;
				color: #A2C833;
				border: 2rpx solid #A2C833;
				height: 36rpx;
				background: rgba(162, 200, 51, 0.08);
				padding: 0 8rpx;
				border-radius: 6rpx;
				line-height: 32rpx;
				margin-right: 10rpx;
			}
		}

		.u-cell-time {
			font-size: 24rpx;
			color: #9C9C9C;
		}
	}


	.u-foot {
		.u-fixed {
			position: fixed;
			left: 0;
			bottom: 0;
			width: 100%;
			padding: 20rpx 24rpx 20rpx 32rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			z-index: 11;
			background-color: #fff;
		}

		.check-label {
			font-size: 28rpx;
			color: #9C9C9C;
		}

		.btn-group {
			.btn {
				font-size: 32rpx;
				color: #fff;
				line-height: 80rpx;
				background-color: #A2C833;
				border-radius: 40rpx;
				width: 240rpx;
			}
		}
	}
	
	.popup-content{
		padding: 52rpx 70rpx 0;
		
		.popup-title{
			font-size: 40rpx;
			color: #303337;
			text-align: center;
			font-weight: 600;
			margin-bottom: 24rpx;
			line-height: 56rpx;
		}
		
		.popup-desc{
			font-size: 32rpx;
			color: #666666;
			text-align: center;
			line-height: 52rpx;
		}
		
		.popup-btns{
			padding: 48rpx 20rpx;
			display: flex;
			
			.popup-btn-item{
				padding: 0 16rpx;
				
				.btn{
					font-size: 32rpx;
					color: #fff;
					background-color: #A2C833;
					line-height: 80rpx;
					border-radius: 40rpx;
				}
				
				.btn-default{
					background-color: #ECEDED;
					color: #606366;
				}
			}
		}
	}
</style>
